jsx3.lang.Package.definePackage("tibco.admin.enterpriseAssets.envDef.envDtls.uddi", function (uddipak) {
});

jsx3.Class.defineClass(
        'tibco.admin.enterpriseAssets.envDef.envDtls.uddi.UddiPlugin', // full name of the class to create
        jsx3.lang.Object,
        [tibco.admin.enterpriseAssets.envDef.envDtls.EnvDtlsNavInterface],
        function(uddi) {
            uddi.getInstance = function(args) {
                if(!uddi.instance) {
                    uddi.instance = new tibco.admin.enterpriseAssets.envDef.envDtls.uddi.UddiPlugin();
                }
                return uddi.instance;
            };

            uddi.prototype.getNamespace = function() {
                return "tibco.admin";
            };

            uddi.prototype.loadComponent = function(parent) {
                var me = this;
                tibco.admin.Main.loadUIResourceAsync(parent, this.getNamespace(), "tibco/admin/enterpriseAssets/envDef/envDtls/uddi/ui/envUList.xml", me, me.componentLoaded);
            };

            //interface method
            uddi.prototype.getNavLinkText = function() {
                return tibco.admin.Main.getServer().getDynamicProperty("@@NavLinkTextUDDIServers");
            };

            uddi.prototype.componentLoaded = function(objEvent) {
                if(objEvent.status == "SUCCESS") {
                    this.block = objEvent.obj;
                    var me = this;
                    this.block.handler = me;
                }
                else {
                    if(objEvent.exception)
                    {
                        tibco.admin.Main.logException(objEvent.exception, objEvent.message);
                    }
                    else {
                        jsx3.log(objEvent.message);
                    }
                }
            }

            uddi.prototype.getComponentPath = function() {
                return  "tibco/admin/enterpriseAssets/envDef/envDtls/uddi/component.xml"
            }

            uddi.prototype.buttonSelected = function() {
                if(this.block) {
                    this.block.callgetUDDIServersAssociatedWithEnvironment();
                }
            }
        })